﻿using Eassets.Data.Secure;
using Eassets.Layered.Domain.Secure;
using System.Collections.ObjectModel;

namespace Eassets.Service.Secure
{
   public class SecurityGroupService
    {
        private SecurityGroupData securityGroupData = new SecurityGroupData();

        /// <summary>
        /// Adds the security group.
        /// </summary>
        /// <param name="securityGroup">The security group.</param>
        public void AddSecurityGroup(SecurityGroup securityGroup)
        {
            securityGroupData.Add(securityGroup);
        }

        /// <summary>
        /// Modifies the security group.
        /// </summary>
        /// <param name="securityGroup">The security group.</param>
        public void ModifySecurityGroup(SecurityGroup securityGroup)
        {
            securityGroupData.Modify(securityGroup);
        }

        /// <summary>
        /// Deletes the security group.
        /// </summary>
        /// <param name="securityGroupId">The security group id.</param>
        public void DeleteSecurityGroup(long securityGroupId)
        {
            securityGroupData.Delete(securityGroupId);
        }

        ///// <summary>
        ///// Gets all business units.
        ///// </summary>
        ///// <returns></returns>
        //public Collection<SecurityGroup> GetSecurityGroupsByOrganizationLevelListId(long OrganizationLevelListId)
        //{
        //    return securityGroupData.GetSecurityGroupsByOrganizationLevelListId(OrganizationLevelListId);
        //}

        /// <summary>
        /// Gets the security group by id.
        /// </summary>
        /// <param name="securityGroupId">The security group id.</param>
        /// <returns></returns>
        public SecurityGroup GetSecurityGroupById(long securityGroupId)
        {
            return securityGroupData.GetSecurityGroupById(securityGroupId);
        }

        public Collection<SecurityGroup> GetAllSecurityGroups() 
        {
            return securityGroupData.GetAllSecurityGroup();
        }
    }
}
